
//
//  ContentTableViewCell.m
//  123
//
//  Created by Apple on 2017/8/2.
//  Copyright © 2017年 闪电极送. All rights reserved.
//

#import "ContentTableViewCell.h"
#import "Additions.h"

@implementation ContentTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self newView];
    }
    return  self;
}

- (void)newView
{
    UILabel *lab = [[UILabel alloc] init];
    [self addSubview:lab];
    lab.numberOfLines = 0;
    [lab sizeToFit];
    
    self.contentLab = lab;
    
}
- (void)layoutSubviews{
    
    self.contentLab.frame= CGRectMake(10, 10, self.frame.size.width-20, self.frame.size.height-10);
    
    
}

+(CGFloat)getHeightContent:(NSString *)content
{
    
    
        CGSize contentSize = [content heightWithFont:[UIFont systemFontOfSize:16] width:300 ];
    
        return contentSize.height+10;

    
    
}
@end
